import request from './request.js'

//注册
export const register = data => request('/api/user/register', 'post', data, 2)
// 账号验证码登录
export const loginByMsgCode = data => request('/api/user/loginByMsgCode', 'post', data, 1)
//发送验证码
export const sendMsg = data => request('/api/common/sendMsg', 'post', data, 1)
// 查询首页商品列表
export const goodsList = data => request('/api/mall/getGoodsPage', 'get', data, 2)
// 查询首页商品详情
export const goodsDetail = data => request('/api/goods/getGoodsDetail', 'get', data, 2)
// 购买商品
export const buyGoods = data => request('/api/mall/buyGoods', 'get', data, 1)
// 账号密码登录
export const passwordLogin = data => request('/api/user/loginByPassword', 'post', data, 1)
// 查询分类列表
export const categoryList = data => request('/api/news/getCategory', 'get', data, 2)
// 首页话题列表
export const indexInfo = data => request('/api/news/getNewsList', 'get', data, 2)
// 首页热门话题
export const hotTopic = data => request('/api/news/getHotTopic', 'get', data, 1)
// 话题详情
export const newsDetail = data => request('/api/news/getNewsDetail', 'get', data, 2)
// 获取个人资料
export const personalData = data => request('/api/user/getPersonalData', 'post', data, 2)
// 个人中心钱包数据
export const walletInfo = data => request('/api/personalCenter/getMyWalletInfo', 'post', data, 2)
// 根据钱包分类查询账单列表
export const billPage = data => request('/api/wallet/getBillPage', 'get', data, 2)
// 查寻收款方式列表
export const paymentList = data => request('/api/user/listPaymentTerm', 'post', data, 2)
// 兑换申请
export const withdrawApply = data => request('/api/wallet/withdrawApply', 'post', data, 2)
// 收款方式详情
export const paymentDetail = data => request('/api/user/detailPaymentTerm', 'post', data, 1)
// 添加_修改收款方式
export const editPayment = data => request('/api/user/addOrUpdatePaymentTerm', 'post', data, 2)
// 查询用户钱包多多券和转化比例
export const userBalance = data => request('/api/user/getUserBalance', 'get', data, 2)
// 转账
export const transfer = data => request('/api/wallet/transfer', 'post', data, 2)
// 转账记录/兑换记录/充值记录/兑换记录/提币记录
export const rechargeRecord = data => request('/api/wallet/getTransferRecord', 'get', data, 2)
// 查询我的订单
export const myOrder = data => request('/api/mall/myGoodsOrder', 'get', data, 2)
// 确认收货
export const confirmReceive = data => request('/api/voucherMall/confirmReceive', 'post', data, 1)
// 初始化实人认证
export const initUserFaceVerify = data => request('/api/user/initUserFaceVerify', 'get', data, 1)
// 实人认证-查询认证结果
export const describeFaceVerify = data => request('/api/user/describeFaceVerify', 'get', data, 1)
// 修改登录密码
export const forgetPassword = data => request('/api/user/forgetPassword', 'post', data, 2)
// 修改支付密码(交易密码)
export const updatePayPassword = data => request('/api/user/updatePayPassword', 'post', data, 2)
// 添加意见反馈
export const feedback = data => request('/api/user/addFeedback', 'post', data, 2)
// 修改个人资料(头像,用户名)
export const updateUser = data => request('/api/user/updatePersonalData', 'post', data, 2)
// 查询抢购专区列表
export const sessionList = data => request('/api/goods/getSessionList', 'get', data, 2)
// 查询首页倒计时
export const nearestTime = data => request('/api/goods/getNearestTime', 'get', data, 2)
// 抢购
export const rushToBuy = data => request('/api/goods/rushToBuy', 'post', data, 1)
// 我的全部抢券
export const myVoucherPage = data => request('/api/goods/getMyVoucherPage', 'get', data, 2)
// 查询分类列表
export const myVoucherCategoryList = data => request('/api/voucherMall/getVoucherCategoryList', 'get', data, 2)
// 查询商城商品列表
export const myVoucherGoodsPage = data => request('/api/voucherMall/getGoodsPage', 'get', data, 2)
// 查询多多券商品详情
export const getVoucherGoods = data => request('/api/voucherMall/getGoodsById', 'get', data, 2)
// 查询商城订单详情
export const getGoodsOrderDetail = data => request('/api/voucherMall/myGoodsOrderDetail', 'get', data, 2)
// 购买多多券商品
export const buyVoucherGoods = data => request('/api/voucherMall/buyGoods', 'get', data, 1)
// 获取充值订单
export const buyVoucherRecharge = data => request('/api/voucherMall/buyGoods2', 'get', data, 1)


// 首页消息轮播
export const getNoticeList = data => request('/api/mall/getNoticeList', 'get', data, 1)




// 获取参数配置
export const selectConfig = data => request('/api/common/selectConfig', 'post', data, 1)


// 预约
export const appointment = data => request('/api/goods/appointment', 'post', data, 1)
// 匹配
export const matching = data => request('/api/goods/matching', 'post', data, 1)
// 查询我的商品
export const myGoods = data => request('/api/goods/getMyGoods', 'get', data, 2)
// 查询我的预约列表
export const myAppointment = data => request('/api/goods/getMyAppointment', 'get', data, 2)
// 转拍商品
export const sellGoods = data => request('/api/goods/sellGoods', 'post', data, 1)
// 下架转拍
export const offShelf = data => request('/api/goods/offShelf', 'get', data, 1)
// 确认出售
export const confirmOrder = data => request('/api/goods/confirmOrder', 'post', data, 1)
// 获取app版本
export const appVersionInfo = data => request('/api/common/getAppVersionInfo', 'post', data, 1)
// 查询banner图
export const bannerList = data => request('/api/mall/getBannerList', 'post', data, 1)
// 查询公告
export const noticeList = data => request('/api/mall/getNoticeList', 'get', data, 2)
// 取消预约
export const cancelAppointment = data => request('/api/goods/cancelAppointment', 'get', data, 2)
// 支付订单
export const payOrder = data => request('/api/goods/payOrder', 'post', data, 1)
// 查询场次列表


// 查询商城商品列表
export const goodsPage = data => request('/api/mall/getGoodsPage', 'get', data, 2)
// 查询课程列表
export const courseList = data => request('/api/voucherMall/getRechargeGoodsPage', 'get', data, 2)



// 获取账号多多券
export const getWallet = data => request('/api/user/getWallet', 'post', data, 2)
// 批量上传OSS云存储
export const uploadBatch = data => request('/api/common/uploadBatch', 'post', data, 1)
// 上传打款凭证
export const addProof = data => request('/api/user/addProof', 'post', data, 2)





// 实名认证
export const realNameAuth = data => request('/api/personalCenter/realNameAuth', 'get', data, 2)
// 退出登录
export const logout = data => request('/api/user/logout', 'post', data, 1)
// 邀请好友
export const inviteFriends = data => request('/api/user/inviteFriends', 'post', data, 1)
// 兑换
export const exchange = data => request('/api/wallet/exchange', 'post', data, 2)

// 我的团队-统计数据
export const teamData = data => request('/api/myTeam/getMyTeamData', 'get', data, 2)
// 我的团队-团队成员列表
export const subUserPage = data => request('/api/myTeam/getSubUserPage', 'get', data, 2)


// 查询用户收货地址
export const getAddress = data => request('/api/mall/getAddress', 'get', data, 2)
// 删除收款方式
export const deletePaymentTerm = data => request('/api/user/deletePaymentTerm', 'post', data, 1)


// 兑换额转化为多多券
export const transferToBalance = data => request('/api/wallet/transferToBalance', 'post', data, 1)
// 多多券转化为快乐豆
export const balanceToHappyBean = data => request('/api/wallet/balanceToHappyBean', 'post', data, 1)
// 查询拍卖商品列表
export const goodsListBuy = data => request('/api/goods/getGoodsList', 'get', data, 2)
//查询我的收货地址
export const addressList = data => request('/api/mall/getAddressList', 'get', data, 2)
//新增收货地址
// export const addAddress = data => request('/api/mall/saveAddress','post',data,2)
//修改收货地址
export const editAddress = data => request('/api/mall/updateAddress', 'get', data, 2)
//删除收货地址
export const delAddress = data => request('/api/mall/deleteAddress', 'get', data, 2)
//提货
export const takeGoods = data => request('/api/goods/takeGoods', 'get', data, 2)
//查询我的商城订单
export const myGoodsOrder = data => request('/api/voucherMall/myGoodsOrder', 'get', data, 2)
//取消商城订单
export const cancelOrder = data => request('/api/voucherMall/cancelOrder', 'post', data, 1)
//获取锁仓机制
export const getLockMechanism = data => request('/api/wallet/getLockMechanism', 'post', data, 1)
//获取资金池百分比
export const getBalancePoolPercent = data => request('/api/personalCenter/getBalancePoolPercent', 'get', data, 2)
//获取支付链接
export const thirdMethodPay = data => request('/api/pay/thirdMethodPay', 'get', data, 2)
//获取充值支付链接
export const thirdMethodPays = data => request('/api/pay/thirdMethodPay2', 'get', data, 2)
//查询会员礼包
export const memberGoodsList = data => request('/api/goods/getMemberGoodsList', 'get', data, 2)
//购买会员礼包
export const buyMemberGoods = data => request('/api/goods/buyMemberGoods', 'get', data, 2)
//我的拍品详情
export const myGoodsDetail = data => request('/api/goods/getMyGoodsDetail', 'get', data, 2)
//一键预约
export const appointmentAll = data => request('/api/goods/appointmentAll', 'get', data, 2)
//转入转出记录
export const getUserTransferRecord = data => request('/api/wallet/getUserTransferRecord', 'get', data, 2)
//兑换记录
export const getWithdrawRecord = data => request('/api/wallet/getWithdrawRecord', 'get', data, 2)

// 获取地址 
export const getBaseAreaList = data => request('/api/voucherMall/getBaseAreaList', 'get', data, 2)



//  新增接口 --------- 
// 预约-易货
export const appointment0214 = data => request('/api/goods/appointment0214', 'post', data, 2)

// 取消我的预约
export const cancelAppointment0214 = data => request('/api/goods/cancelAppointment0214', 'post', data, 1)

// 商品详情-包含场次信息
export const getGoodsAndSessionsDetailInfo = data => request('/api/goods/getGoodsAndSessionsDetailInfo', 'get', data, 2)

// 查询我的预约列表
export const getMyAppointment0214 = data => request('/api/goods/getMyAppointment0214', 'get', data, 2)

// 出售商品-流转
export const sellGoods0214 = data => request('/api/goods/sellGoods0214', 'post', data, 2)

// 查询所有场次商品列表
export const getSessionsList = data => request('/api/sessions/getSessionsList', 'get', data, 2)

// 查询场次商品列表
export const getGoodsList = data => request('/api/sessions/goods/getGoodsList', 'get', data, 1)
// 查询我的商品数量 
export const myUserGoodsNum0214 = data => request('/api/goods/getMyUserGoodsNum0214', 'get', data, 1)
// 仓库列表
export const getMyWarehousePage = data => request('/api/voucherMall/getMyWarehousePage', 'get', data, 1)
// 提货券/本金兑换商品
export const exchangeGoods = data => request('/api/voucherMall/exchangeGoods', 'post', data, 1)
// 我的提货订单
export const myDeliveryOrder = data => request('/api/voucherMall/myDeliveryOrder', 'get', data, 1)
// 绿色积分
export const getWelfareRank = data => request('/api/wallet/getWelfareRank', 'get', data, 1)

// 下架商品-取消流转
export const offShelf2014 = data => request('/api/goods/offShelf2014/' + data, 'post', data, 1)


export const sellGoodsByUserGoodsId0214 = data => request('/api/goods/sellGoodsByUserGoodsId0214/' + data, 'post', data,
	1)



export const takeGoodsByUserGoodsId0214 = data => request('/api/goods/takeGoodsByUserGoodsId0214', 'post', data, 2)


export const confirmReceiptByUserGoodsId0214 = data => request('/api/goods/confirmReceiptByUserGoodsId0214/' + data,
	'post', data, 1)


// 提货券捐赠

export const donateVoucher = data => request('/api/voucherMall/donateVoucher', 'post', data, 1)
export const barterGoods = data => request('/api/voucherMall/barterGoods', 'post', data, 2)

export const updateVerifyState = data => request('/api/user/updateVerifyState', 'post', data, 2)


export const getOrderLogisticsInfo = data => request('/api/voucherMall/getOrderLogisticsInfo', 'get', data, 2)


export const getOrderLogisticsInfo2 = data => request('/api/goods/getOrderLogisticsInfo', 'get', data, 2)


export const getExchangeAccount = data => request('/api/personalCenter/getExchangeAccount', 'get', data, 2)


export const bindExchangeAccount = data => request('/api/personalCenter/bindExchangeAccount', 'get', data, 2)

export const transferToKllzService = data => request('/api/wallet/transferToKllzService', 'post', data, 2)

export const getTransferToTxUserNameAvatar = data => request('/api/wallet/getTransferToTxUserNameAvatar', 'post', data,
	2)

export const getTransferToKllzServiceQrCode = data => request('/api/wallet/getTransferToKllzServiceQrCode', 'get', data, 2)


// 积分跨转
export const swapPoint = data => request('/api/swapPoint/swapPoint2Txsh', 'get', data, 1)
// 积分跨转明细
export const swapPointDetails = data => request('/api/swapPoint/getSwapInfoPage', 'get', data, 1)

//新易货---开始
export const simpleUserBalance = data => request('/api/user/getSimpleUserBalance','get',data,2)
// 按金额匹配商品
export const matchGoods = data => request('/api/goods/matchGoods','get',data,2)
// 进货-批量加入购物车
export const batchAddGoodsToCart = data => request('/api/goods/batchAddGoodsToCart','get',data,2)
//查询购物车列表
export const getShoppingCart = data => request('/api/goods/getShoppingCart','post',data,2)
// 删除购物车商品
export const deleteGoodsCart = data => request('/api/goods/deleteGoodsCart','get',data,2)
// 一键上架
export const sellAllGoods = data => request('/api/goods/sellAllGoods','post',data,2)
// 交割商品-发货
export const takeUserGoodsToOrder = data => request('/api/goods/takeUserGoodsToOrder','post',data,1)
// 设置福利权益类型
export const setWelfareType = data => request('/api/user/setWelfareType', 'post', data, 1)
// 交割商品-转豆
export const takeUserGoodsToIntegral = data => request('/api/goods/takeUserGoodsToIntegral','post',data,1)
// 查询分类列表
export const getGoodsTypeList = data => request('/api/goods/getGoodsTypeList','get',data,2)
// 查询商品列表
export const saleGoodsPage = data => request('/api/goods/getSaleGoodsPage','get',data,2)
//新易货---结束
// 合伙人类型列表
export const getPartnerInfoList = data => request('/api/personalCenter/getPartnerInfoList', 'get', data, 2)

// 购买合伙人
export const buyPartner = data => request('/api/personalCenter/buyPartner', 'get', data, 2)

// 查询合伙人信息
export const getUserPartnerInfo = data => request('/api/personalCenter/getUserPartnerInfo', 'get', data, 2)
//获取天气和地址
export const getWeatherAndCity = data => request('/api/home/getWeatherAndCity', 'get', data, 2)
export const getIndexInfoList = data => request('/api/mall/getIndexInfoList', 'get', data, 1)
export const getIndexCategoryList = data => request('/api/mall/getIndexCategoryList', 'get', data, 1)
